package com.colorlight.cloud.complete.entity.po;

import com.colorlight.cloud.gateway.api.annotation.defaultValue;
import com.colorlight.cloud.gateway.api.annotation.percent;
import com.colorlight.cloud.gateway.api.message.constraint.basics.object.Trans;
import com.colorlight.iot.proto.complete.entity.CompleteEntity;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class MonitoringData implements Trans<MonitoringData, CompleteEntity.MonitoringData> {

    /**
     * 温度，后3位作为小数点后的值
     */
    @percent
    @defaultValue
    private Float temperature;

    /**
     * 湿度，后3位作为小数点后的值
     */
    @percent
    @defaultValue
    private Float humidity;

    /**
     * 电压，后3位作为小数点后的值
     */
    @percent
    @defaultValue
    private Float voltage;

    /**
     * 总工作时间
     */
    private Integer totalWorkTime;

    /**
     * 监控数据是否有效
     */
    private Boolean monitorDataValid;

}

